dojo.provide("xray.tools.Client");

dojo.require("dijit._Widget");
dojo.require("dijit._Templated");

dojo.declare("xray.tools.Client",
	[dijit._Widget, dijit._Templated], {
	// summary: Render the available clients into the toolbar, by clicking a client icon the graph can be turned on/off for this client.
	// (Thats how I imagine this ...)
	
	iconPath: dojo.moduleUrl("xray.tools.resources", ""),
	defaultIcon: dojo.moduleUrl("xray.tools.resources", "unknown.png"),
	templateString: '<span dojoAttachPoint="clientContainer"></span>',
	
	postCreate: function(){
		this.inherited(arguments);
		for (var i=0, l=xray.config.clients.length; i<l; i++){
			var client = xray.config.clients[i];
			var img = new Image();
			img.src = this.iconPath+client+'.png';
			this.clientContainer.appendChild(img);
		};
	}
});